'use strict';
import * as Koa from 'koa';
import { router, prefix } from '../middleware/router';
import { response } from '../middleware/result';
import { platformjoinnews_Service } from '../service/platform_joinnews';


/** 入驻资讯 */
@prefix('platformjoinnews')
class platformjoinnewsController {
     /**
     * @api {post} /platformjoinnews/save  保存入驻资讯
     * @apiDescription 保存酒水
     * @apiName save
     * @apiParam (参数) {String} doc  酒水对象tsc
     * @apiSampleRequest /platformjoinnews/save
     * @apiGroup platformjoinnews
     * @apiVersion 1.0.0
     */
    @router('/save', { method: 'post' })
    async save(ctx: Koa.Context) {
     let data =  platformjoinnews_Service.save(ctx.request.body);
       
        response(ctx, data);
    
    }
    
     /**
     * @api {post} /platformjoinnews/query  分页查询入驻资讯
     * @apiDescription 分页查询驻资讯
     * @apiName query
     * @apiParam (参数) {String} offset  页码
     * @apiParam (参数) {String} limit  每页显示条数
     * @apiSampleRequest /platformjoinnews/query
     * @apiGroup platformjoinnews
     * @apiVersion 2.0.0
     */
    @router('/query', { method: 'post' })
    async querywinebymid(ctx: Koa.Context) {
        let result = await platformjoinnews_Service.querybypage(ctx.request.body);
        response(ctx, result);
    }
}